﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Logging.LogBDD
{
    public class LoggingBaseDeDonne : ILogService
    {
        public String NameOrConnectionString
        {
            get;
            private set;
        }

        private DataAbstractAccess DataAccess
        {
            get;
            set;
        }

        public LoggingBaseDeDonne(String nameOrConnectionString)
        {
            NameOrConnectionString = nameOrConnectionString;
            DataAccess = new DataAbstractAccess(NameOrConnectionString);
        }

        #region ILogService Membres

        public void WriteLog(Utils.LogTrace log)
        {
            DataAccess.InsertLog(log);
        }

        #endregion
    }
}
